package com.xiaomi.pojo;

import java.io.Serializable;

public class Describes implements Serializable {

    private int deid;//商品详情表id
    private int cid;//商品表id
    private String depraice;//商品价格
    private String config;//商品详情
    private int count;//商品库存
    private int sale;//销售数量
    private String picture;//商品图片
    private int recommend;//商品详情推广
    private String comname;//商品名称

    private String pbname;//商品类型

    public String getPbname() {
        return pbname;
    }

    public void setPbname(String pbname) {
        this.pbname = pbname;
    }

    public String getComname() {
        return comname;
    }

    public void setComname(String comname) {
        this.comname = comname;
    }

    public int getRecommend() {
        return recommend;
    }

    public void setRecommend(int recommend) {
        this.recommend = recommend;
    }

    public int getDeid() {
        System.out.println(deid);
        return deid;
    }

    public void setDeid(int deid) {
        this.deid = deid;
    }

    public int getCid() {
        System.out.println(cid);
        return cid;
    }

    public void setCid(int cid) {
        this.cid = cid;
    }

    public String getDepraice() {
        return depraice;
    }

    public void setDepraice(String depraice) {
        this.depraice = depraice;
    }

    public String getConfig() {
        return config;
    }

    public void setConfig(String config) {
        this.config = config;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public int getSale() {
        return sale;
    }

    public void setSale(int sale) {
        this.sale = sale;
    }

    public String getPicture() {
        String[] path = picture.split(",");
        for (int i = 0; i < path.length; i++) {
            System.out.println(path[i]);
        }
        return path[0];
    }

    public void setPicture(String picture) {
        this.picture = picture;
    }

    @Override
    public String toString() {
        return "Describes{" +
                "deid=" + deid +
                ", cid=" + cid +
                ", depraice='" + depraice + '\'' +
                ", config='" + config + '\'' +
                ", count=" + count +
                ", sale=" + sale +
                ", picture='" + picture + '\'' +
                ", recommend=" + recommend +
                ", comname='" + comname + '\'' +
                ", pbname='" + pbname + '\'' +
                '}';
    }
}

